package com.itheima.pojo;

<<<<<<< HEAD
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.groups.Default;
import lombok.Builder;
import lombok.Data;
import org.apache.ibatis.annotations.Update;
=======
import lombok.Data;
>>>>>>> 08ea7c3a718b4abad24581cc274164043dc145f5

import java.time.LocalDateTime;

@Data
public class Category {
<<<<<<< HEAD
    @NotNull(groups = update.class)
    private Integer id;//主键ID
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String categoryName;//分类名称
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String categoryAlias;//分类别名
    @JsonIgnore
    private Integer createUser;//创建人ID
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;//创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;//更新时间


    //未指定的validation校验默认属于Default
    public interface add extends Default{

    }
    public interface update extends Default{

    }
=======
    private Integer id;//主键ID
    private String categoryName;//分类名称
    private String categoryAlias;//分类别名
    private Integer createUser;//创建人ID
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//更新时间
>>>>>>> 08ea7c3a718b4abad24581cc274164043dc145f5
}
